﻿using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using Sqo;

namespace EDMD
{
    /// [Generated Jan 30 2011]
    public partial class i_Field : Utils, ISqoDataObject
    {

        #region "private fields"

        private int _Field_ID;
        private string _Field_Name;
        private string _Caption;
        private bool _Include;
        private int _MinLength;
        private int _MaxLength;
        private int _Field_Type_ID;
        private string _GUID;

        #endregion

        #region "public properties"

        public int Field_ID
        {
            get { return _Field_ID; }
            set { _Field_ID = value; }
        }
        public string Field_Name
        {
            get { return _Field_Name; }
            set { _Field_Name = value; }
        }
        public string Caption
        {
            get { return _Caption; }
            set { _Caption = value; }
        }
        public bool Include
        {
            get { return _Include; }
            set { _Include = value; }
        }
        public int MinLength
        {
            get { return _MinLength; }
            set { _MinLength = value; }
        }
        public int MaxLength
        {
            get { return _MaxLength; }
            set { _MaxLength = value; }
        }
        public int Field_Type_ID
        {
            get { return _Field_Type_ID; }
            set { _Field_Type_ID = value; }
        }
        public string GUID
        {
            get { return _GUID; }
            set { _GUID = value; }
        }

        #endregion

        #region "ISqoDataObject"
        object ISqoDataObject.GetValue(System.Reflection.FieldInfo field) { return field.GetValue(this); }
        void ISqoDataObject.SetValue(System.Reflection.FieldInfo field, object value) { field.SetValue(this, value); }
        int ISqoDataObject.OID { get { return Field_ID; } set { } }
        #endregion
    }//public partial class i_Field : Utils, ISqoDataObject

    public partial class s_Field : i_Field
    {
        #region "MAPPER"
        public static i_Field Convert(Field od_Field)
        {
            return new i_Field()
            {

                Field_ID = IsNull(od_Field.Field_ID),
                Field_Name = IsNull(od_Field.Field1),
                Caption = IsNull(od_Field.Caption),
                Include = IsNull(od_Field.Include),
                MinLength = IsNull(od_Field.MinLength),
                MaxLength = IsNull(od_Field.MaxLength),
                Field_Type_ID = IsNull(od_Field.Field_Type_ID),
                GUID = IsNull(od_Field.GUID),

            };
        }
        #endregion
    }//public partial class s_Field : i_Field

}//namespace EDMD

